package io2;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos);
        osw.write("雄关漫道真如铁，");
        osw.write("而今迈步从头越。");
        System.out.println("写出完毕");
        osw.close();









//        FileOutputStream fos = new FileOutputStream("osw.txt");
//        OutputStreamWriter osw  = new OutputStreamWriter(fos);
//        osw.write("一二三四五");
//        osw.write("上山打老虎");
//        System.out.println("写出完毕");
//        osw.close();
    }
}
